package com.chinacoal.hr.levelapi.client;

import com.chinacoal.hr.levelapi.client.fallback.OrganizationClientFallback;
import com.chinacoal.hr.levelapi.client.response.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignAutoConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by jinyabin on 2020/10/29.
 */
@Api(tags = {"查询机构或者部门"})
@FeignClient(name = "ccip-hr-attendance",configuration = FeignAutoConfiguration.class,fallback = OrganizationClientFallback.class)
public interface OrganizationClient  {



    /**
     * 获取机构或者部门
     *
     * @param parentOrgId :
     * @param isdept      : 是否是部门1是0否
     * @return : com.chinacoal.hr.levelapi.response.Result
     * @author : YunTao.Li
     * @date : 2019/12/3 2019/12/3
     */
    @ResponseBody
    @GetMapping("/organizations")
    @ApiOperation(value = "获得机构列表")
    public Result orgList(@ApiParam("组织机构") String parentOrgId,
                          @ApiParam("是否部门1是0否") String isdept) ;


}
